import { useContext } from 'react'
import { Form, Input, Button, Select } from 'antd'
import CounterContext1 from './ExampleList1.context.js';



//查询条件
const SearchConiMod = () => {
	const { sexOptions, searchList } = useContext(CounterContext1);
	const onFinish = (values: any) => {
		searchList(values);
	};

	return (
	<Form
		name="basic"
		layout="inline"
		initialValues={{ remember: true }}
		onFinish={onFinish}
		>
		<Form.Item
			label="用户编号"
			name="username">
			<Input />
		</Form.Item>
		<Form.Item
			label="用户名"
			name="username">
			<Input />
		</Form.Item>
		<Form.Item
			label="昵称"
			name="username">
			<Input />
		</Form.Item>
		<Form.Item
			label="性别"
			name="sex">
			<Select style={{ width: 70 }}>
				{sexOptions}
			</Select>
		</Form.Item>

		<Form.Item wrapperCol={{ offset: 8, span: 16 }}>
			<Button type="primary" htmlType="submit">查询</Button>
		</Form.Item>
	</Form>
	);
};

export default SearchConiMod;